﻿<Window x:Class="SellAvi.Views.WindowAddProduct"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        Title="Добавление нового товара" Height="500" Width="500"
        DataContext="{Binding EditProduct, Source={StaticResource Locator}}">
    <i:Interaction.Triggers>
        <i:EventTrigger EventName="Closing">
            <i:InvokeCommandAction Command="{Binding WindowClosingCommand}" />
        </i:EventTrigger>
    </i:Interaction.Triggers>
    <!--BODY-->
    <!-- http://erikej.blogspot.ru/2014/11/using-sqlite-with-entity-framework-6.html -->
    <DockPanel>
        <DockPanel DockPanel.Dock="Bottom">
            <StackPanel Orientation="Horizontal" DockPanel.Dock="Left">
                <Button Command="{Binding PrevProductCommand}" Width="20" ToolTip="Перейти к предыдущему товару">
                    <Image Source="/SellAvi;component/Resources/arrow1_w.png"></Image>
                </Button>
                <TextBox Width="30" Text="{Binding CurrentAvitoProduct.Id}" IsEnabled="False"></TextBox>
                <Button Command="{Binding NextProductCommand}" Width="20" ToolTip="Перейти к следующему товару">
                    <Image Source="/SellAvi;component/Resources/arrow1_e.png"></Image>
                </Button>
            </StackPanel>

            <StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
                <Button Command="{Binding SaveProductCommand}"  ToolTip="Сохранить товар">
                    <StackPanel Orientation="Horizontal">
                        <Image Source="/SellAvi;component/Resources/save.png" Width="14"></Image>
                        <TextBlock Margin="5,0,5,0">Сохранить</TextBlock>
                    </StackPanel>
                </Button>
            </StackPanel>

            <TextBlock Padding="5,0,5,0" Text="{Binding StatusText}"></TextBlock>

        </DockPanel>
        
        <DockPanel Dock="Top">
            <Button  DockPanel.Dock="Left" Background="WhiteSmoke" Command="{Binding ChangePageCommand}" CommandParameter="PageAdditionals" Height="20" Width="75" HorizontalAlignment="Left">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                    <Image Source="/SellAvi;component/Resources/arrow2_w.png"></Image>
                    <Label Padding="5,0,0,0" Content="{Binding CurrentPageName}" FontSize="10"></Label>
                </StackPanel>
            </Button>
            <Button DockPanel.Dock="Left" Command="{Binding MarkProductCommand}" ToolTip="Поставить товар в очередь на загрузку в Avito">
                <StackPanel Orientation="Horizontal">
                    <Image Source="/SellAvi;component/Resources/flag.png" Width="14"></Image>
                    <Label Padding="5,0,0,0" Content="опубликовать" FontSize="10"></Label>
                </StackPanel>
            </Button>
            <Grid></Grid>

        </DockPanel>
        
        <Frame NavigationUIVisibility="Hidden" Content="{Binding Path=CurrentPage, UpdateSourceTrigger=PropertyChanged}">

        </Frame>
    </DockPanel>
</Window>
    